<?php if('front' == $this->layout):?>
<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?=$_SESSION['init']['site_name']?><?php if($this->title){echo " - ".$this->title;}?></title>
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="/images/i/favicon.png">
  <link rel="stylesheet" href="/styles/amazeui.min.css">
  <link rel="stylesheet" href="/styles/swiper.min.css">
  <link rel="stylesheet" href="/styles/app.css">
  <style>
	 .swiper-container-horizontal>.swiper-pagination{left:-20px; bottom:5px;}
	 .swiper-pagination{ text-align:right;}
	 .swiper-pagination li{width:12px; height:12px;}
	 .swiper-slide img{width:100%;}
	 .am-list-news-default{margin:0; padding:10px;}
	 .am-list-news-default .am-list>li{ border:1px dashed #EDEEEF;border-left:3px solid #4B5E76;border-top-left-radius:10px;}
	 .am-list-news-default .am-list .am-list-item-thumb-left .am-list-thumb {padding-left:10px; padding-right:0;}
	 .am-list, .am-topbar{margin-bottom:0;}
	 .am-slider-default .am-control-nav {
            bottom: 7%;
            text-align: right;
            right: 4%;
        }

        .am-slider-default .am-control-nav li a {
            width: 12px;
            height: 12px;
        }

        .am-slider-default {
            margin: 0;
        }

        .am-list-news-default {
            margin: 0;
            padding: 10px;
        }

        .am-list-news-default .am-list > li {
            border: 1px dashed #EDEEEF;
            border-left: 3px solid #4B5E76;
            border-top-left-radius: 10px;
        }

        .am-list-news-default .am-list .am-list-item-thumb-left .am-list-thumb {
            padding-left: 10px;
            padding-right: 0;
        }

        .am-list, .am-topbar {
            margin-bottom: 0;
        }
        /*添加css代码*/
        .home_pr{position: relative;z-index: 9;}
        .home_h i{display: inline-block;position: relative;top: -2px;margin-left: 4px;;width: 0;height: 0;
            border-left: 6px solid transparent;border-right: 6px solid transparent;border-top: 6px solid #fff;}
        .home_h_sub{z-index: 1;display: none;position: absolute;left: 0;top: 49px;width: 100%;max-height: 162px;background-color: #fff;overflow-y: auto;}
        .home_h_sub_box{width: 96%;margin: 0 auto;padding: 5px 0 5px 1%;;}
        .home_h_sub_box a{display: inline-block;width: 28%;margin: 5px 2%;height: 40px;line-height: 40px;box-shadow: 0 0 1px 0 #ccc inset;text-align: center;
        font-size: 18px;}
        .home_h_sub_box a:hover{background-color: #1d78da;color: #fff;}
        .zhezhao{position: fixed;left: 0;top: 0;width: 100%;height: 100%;background-color: #000;opacity: 0.6;}
        /*添加css代码end*/
  </style>
</head>
<body>
<?php if($_SESSION['site']['news'] || $this->news):?>
<!--title s-->
<div class="am-g part1_title" id="news">
  <div class="am-u-sm-4"><span class="am-icon-times  part1_title_span" onclick="change('news'); return false;"></span><?=($this->news?$this->news:$_SESSION['site']['news'])?></div>
</div>
<!--title e-->
<?php endif;?>

<!--header s-->
<header data-am-widget="header" class="am-header am-header-default home_pr">
    <div class="am-header-left am-header-nav">
		<a href="<?php if($this->back_url):?><?=$this->back_ur?><?php else:?>javascript:history.go(-1);<?php endif?>"><i class="am-header-icon am-icon-chevron-left"></i></a>
    </div>
    
		<?php if($this->channel_title):?>
			<h1 class="am-header-title home_h">
				<a href="#title-link"><?=($this->province?$this->province:"选择地区")?><i></i></a>
			</h1>
			<div class="home_h_sub">
				<div class="home_h_sub_box">
					<?php if($this->provinces):?>
					<?php foreach($this->provinces as $province):?>
						<a href="/index/channels/province/<?=$province?>"><?=$province?></a>
					<?php endforeach;?>
					<?php endif;?>
				</div>
			</div>
		<?php else:?>
			<h1 class="am-header-title">
			<?=$this->title?$this->title:$_SESSION['init']['site_name']?>&nbsp;&nbsp;&nbsp;&nbsp;<?php if($this->level3_id){$redi = "/level3_id/".$this->level3_id;}else{$redi = "";} if($_SESSION['member_info']['member_id']){echo "<a href='/index/dashboard'>[首页]</a>&nbsp;<a href='/members/'>[会员中心]</a>&nbsp;<a href='/members/logout'>[退出]</a>";}else{echo "<a href='/members/login".$redi."'>[登陆]</a> <a href='/members/register".$redi."'>[注册]</a>";}?>
			</h1>
		<?php endif;?>
		
</header>
<!--header e-->

<?php echo $this->layout()->content; ?>
<?php if($this->lcb_image):?>
	<img src="<?=$this->lcb_image?>" border="0" width="0" height="0" />
<?php endif;?>
	
<div class="am-nav-bottom">
        <a href="javascript:" class="am-nav-bottom-ioc">
            <img align="absmiddle" src="/images/i/show-more-ico.jpg">
        </a>
        <a href="/" class="am-nav-bottom-li">领彩乐道</a>
        <a href="/members" class="am-nav-bottom-li">会员中心</a>
    </div>
    <!--样式-->
    <style>
        .am-nav-bottom{position: fixed;max-width: 640px;bottom: 0;background-color: #fff;width: 100%;height: 46px;border-top: 1px solid #D8D8D8;}
        .am-nav-bottom-ioc{float: left;width: 12%;height: 46px;border-right: 1px solid #D8D8D8;text-align: center;display: table-cell;vertical-align:middle;}
        .am-nav-bottom-ioc img{width: 28px;height: 28px;margin-top:8px;vertical-align:middle;}
        .am-nav-bottom .am-nav-bottom-li{margin-left: -1px;float: left;display: inline-block;width: 44%;line-height: 50px;text-align: center;color:#323232;font-size: 16px;
            border-right: 1px solid #D8D8D8;}
        .am-nav-bottom .am-nav-bottom-li:last-child{border-right: 0;}
    </style>
<script language="JavaScript">
function change(el) {
	whichEl = document.getElementById(el)   //获得指定ID值的对象
	if (whichEl.style.display == 'none') {   //block是默认值为显示,none为隐藏
		whichEl.style.display   = 'block';
	} else {
		whichEl.style.display   = 'none';
		
		$.ajax({
			type: "post",
			url : "/ajax/remove-news",
			dataType:'json',
			data: {},
			success: function(json){
				
			}
		});
	}
}
</script>
  <script src="/scripts/jquery.min.js"></script>
  <script src="/scripts/swiper.min.js"></script> 
  <script src="/scripts/amazeui.min.js"></script>
  <script src="/scripts/app.js"></script>
  <script>
	var mySwiper = new Swiper('.swiper-container', {
		autoplay: 3000,//可选选项，自动滑动
		pagination : '.swiper-pagination',
		paginationElement : 'li',
		loop : true,
	})
  </script>
    <script type="text/javascript">
        $(function(){
            $(".home_h > a").click(function(){
                if( $(".home_h_sub").is(":hidden") ){
                    $("body").append('<div class="zhezhao"></div>');
                    $('.home_h_sub').slideDown(500);
                }else{
                    $(".zhezhao").fadeOut(1000);
                    $('.home_h_sub').slideUp(500);
                }
            });
        });
    </script>
<!--
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?a4bcaa0f79dc230d9a26e36985cbc332";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
-->
</body>
</html>


<?php elseif('backend' == $this->layout):?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>领彩乐道后台
<?php if($this->title):?>
- <?=$this->title?>
<?php endif;?>
</title>
<link href="/backend/styles/home/red.css" rel="stylesheet">
<script src="/backend/scripts/jquery-1.10.2.js"></script>
<?php if($this->call_jquery_ui):?>
<link rel="stylesheet" href="/backend/styles/redmond/jquery-ui-1.10.4.custom.min.css" />
<script src="/backend/scripts/jquery-ui-1.10.4.custom.min.js"></script>
<?php endif;?>
<script src="/backend/scripts/jquery.icheck.min.js"></script>
<script type="text/javascript">
$(function(){

	$("dl").hide();
	
	$("li.mainmenu").hover(function(){
		$(this).find("dl").stop(true,true);
		$(this).find("dl").slideDown();
	},function(){
		$(this).find("dl").stop(true,true);
		$(this).find("dl").slideUp();
	});
	
})
</script>

	<?php if($this->call_editor):?>
	<script type="text/javascript" charset="utf-8" src="/backend/scripts/ueditor/ueditor.config.js"></script>
	<script type="text/javascript" charset="utf-8" src="/backend/scripts/ueditor/ueditor.all.min.js"> </script>
	<script type="text/javascript" charset="utf-8" src="/backend/scripts/ueditor/lang/zh-cn/zh-cn.js"></script>
<?php endif;?>

<style type="text/css">
*{margin:0px;padding:0px;font-family:"Microsoft YaHei";}
/* nav */
a{text-decoration: none;border:0; color: #2f00ee;}
a:hover{text-decoration:underline;border:0;}
.wan-nav{width:96%;height:46px;background:#969595; border-radius:5px;margin:0px auto 15px auto;}
.wan-nav a{ text-decoration:none;}
.wan-nav li{float:left;width:108px;height:46px;line-height:46px;text-align:center;font-size:14px;position:relative;list-style:none;}
.wan-nav li a{display:block; color:#FFF;text-decoration:none;font-family:"Microsoft YaHei"; font-size:16px; }
.wan-nav li a.link{float:left;width:108px;}
.wan-nav ul li a:hover{display:block;}
.wan-nav dl{width:108px;border:1px solid #ccc; border-top:none;font-size:12px; background:#fff;position:absolute;top:46px;left:0px;}
.wan-nav dl dd a{color:#333;}
.wan-nav dl dd a:hover{color:#fff;background:#bbb;}
/* table */
.content-table-title{width:96%;font-size:20px; color:#333;height:40px; text-align:center;}
.content-table{width:96%;margin:0 auto; }
.content-table table{width:100%;border-collapse:collapse;text-align:center;}
.content-table table tr{ height:30px; font-size:12px;}
.content-table table tr th{border:1px solid #ccc; font-size:14px; background:#eeeded; font-weight:normal; font-family:"Microsoft YaHei", Arial;}
.content-table table tr td{border:1px solid #ccc; font-family:"Microsoft YaHei", Arial;}
/* 表单*/
input{margin:20px 0px 0 0;}
input[type="text"],input[type="password"]{width:210px;height:30px;padding:0px 0px 0 10px;line-height:30px;border:1px solid #c2c2c2;border-radius:3px;font-size:14px;color:#999;outline:0; }
/* button*/
.button{ display:inline-block;width:130px;height:40px; line-height:40px; font-size:16px;outline:0; text-align:center; border:none;background:#4baa34; border-radius:5px;color:#fff; text-decoration:none;}
.button:hover{ background:#3f952b;}
.button-cancle{ display:inline-block;width:130px;height:40px; line-height:40px; font-size:16px;outline:0; text-align:center; border:none;background:#ddd; border-radius:5px;color:#333;border:1px solid #ccc; text-decoration:none;}
.button-cancle:hover{background:#cccaca;}
.buttonlong{ display:inline-block;width:310px;height:40px; line-height:40px; font-size:16px;outline:0; text-align:center; border:none;background:#4baa34; border-radius:5px;color:#fff; text-decoration:none;}
.buttonlong:hover{ background:#3f952b;}
/* 表单select*/
select {
    border: solid 1px #999;
    appearance:none;
	outline:0;
    -moz-appearance:none;
    -webkit-appearance:none;
    padding:5px 25px 5px 5px;
    background: url(/backend/images/home/arrow.png) no-repeat scroll right center transparent;

}select::-ms-expand { display: none; }

/* add*/
font{color: #f00;}
.form-edit{ margin: 0 auto; background:#eee;padding:10px; height:450px; text-align:center;}
.form-edit form{ width: 350px; margin: 10px auto 0 auto;}
.form-edit form span{width: 70px; display:inline-block; text-align:left;}
.form-edit form select{margin-top: 20px;}
.form-edit-task{ margin: 0 auto; background:#eee;padding:10px;}
.form-edit-task form{ width: 790px; margin: 10px auto 0 auto;}
.form-edit-task form span{width: 80px;height:30px; display:inline-block; text-align:left;}
.form-edit-task form span.special{vertical-align: top;}
.form-edit-task form span.link{display:block;height: 170px;float:left;}
.form-edit-task form input.juli{margin-left:100px;}
.form-edit-task form select{margin-top: 20px;}
.form-category-list input{ margin:10px auto;}
.content-table-breadcrumb a{display:inline-block;width:130px;height:40px; line-height:40px; font-size:16px;outline:0; text-align:center; border:none;background:#aaa; border-radius:5px;color:#fff; text-decoration:none;margin-bottom:15px;}
.content-table-breadcrumb a:hover{background:#bbb;}
.replace{height:40px;border: 1px solid #ddd;line-height: 40px; background: #effeeb;text-align: center;}
.replace span{ display:block;width:65px;padding-left: 30px; margin:0 auto;background:url(/backend/images/home/gou.png) no-repeat left center;}
</style>
</head>

<body>

<div class="wan-nav">
	<ul>
		<?=$this->main_menu?>
	</ul>
</div>
<?php echo $this->layout()->content; ?>
</body>
</html>

<?php endif; ?>
